package tw.miku.protocol.codec.gold;

import java.nio.charset.CharacterCodingException;

import org.apache.mina.core.buffer.IoBuffer;

import tw.miku.constants.ProtocalConstants;
import tw.miku.protocol.codec.AbstractResponseMessagePack;

public class ChangeCurrentTurnResponsePack extends AbstractResponseMessagePack
{
	public long turn;

	public ChangeCurrentTurnResponsePack()
	{

	}

	@Override
	public IoBuffer encode() throws CharacterCodingException
	{
		IoBuffer buf = IoBuffer.allocate(12);
		buf.putUnsignedInt(8);
		buf.putShort(getTag());
		buf.putShort((short) 0);
		buf.putUnsignedInt(turn);
		buf.flip();
		return buf;
	}

	@Override
	public short getTag()
	{
		return ProtocalConstants.CHANGE_CURRENT_TURN;
	}

}
